﻿using CommunityToolkit.Mvvm.Input;
using HandyControl.Tools.Extension;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HardToolApp.ViewModel
{
    public class InteractiveDialogViewModel : IDialogResultable<string>
    {
        public RelayCommand closeCmd {  get; set; }

        public void CloseCommand()
        {
            Result = null;
            CloseAction.Invoke();
        }
        public InteractiveDialogViewModel() 
        {
            closeCmd = new RelayCommand(CloseCommand);
        }
        private string _result;
        public string Result { get => _result; set { _result = value; }}
        public Action CloseAction { get; set; }
        
        private string _message;
        public string Message { get => _message; set { _message = value; } }

    }
}
